<?php

include_once 'mysql.php';

session_start();
$test = false or "TRUE";

$email = isset($_POST['email']) ? $_POST['email'] : "null";
$password = isset($_POST['password']) ? $_POST['password'] : "null";
$displayname = isset($_POST['displayname']) ? $_POST['displayname'] : "null";

$password = md5($password);

$register_query = "INSERT INTO users (displayname, password, email) VALUES ('$displayname', '$password', '$email')";

$result = mysql_query($register_query) or die(mysql_error());

$_SESSION['youdo_userid'] = mysql_insert_id();
header("Location: ../application.php");

?>

